package uselessmouths.mainservices.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

@Entity
@Table(name = "terminal")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Terminal.findAll", query = "SELECT t FROM Terminal t"),
    @NamedQuery(name = "Terminal.findByRecid", query = "SELECT t FROM Terminal t WHERE t.recid = :recid"),
    @NamedQuery(name = "Terminal.findByName", query = "SELECT t FROM Terminal t WHERE t.name = :name"),
    @NamedQuery(name = "Terminal.findByUserid", query = "SELECT t FROM Terminal t WHERE t.userid = :userid"),
    @NamedQuery(name = "Terminal.findByActive", query = "SELECT t FROM Terminal t WHERE t.active = :active")})
public class Terminal implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "RECID")
    private Integer recid;
    @Column(name = "NAME")
    private String name;
    @Column(name = "USERID")
    private Integer userid;
    @Column(name = "ACTIVE")
    private String active;

    public Terminal() {
    }

    public Terminal(Integer recid) {
        this.recid = recid;
    }

    public Integer getRecid() {
        return recid;
    }

    public void setRecid(Integer recid) {
        this.recid = recid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getUserid() {
        return userid;
    }

    public void setUserid(Integer userid) {
        this.userid = userid;
    }

    public String getActive() {
        return active;
    }

    public void setActive(String active) {
        this.active = active;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (recid != null ? recid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Terminal)) {
            return false;
        }
        Terminal other = (Terminal) object;
        if ((this.recid == null && other.recid != null) || (this.recid != null && !this.recid.equals(other.recid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "uselessmouths.mainservices.entities.Terminal[ recid=" + recid + " ]";
    }

}
